package chaozuo;

import shu.Booklist;
import shu.book;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 18128
 * Date: 2023-09-24
 * Time: 12:47
 */
public class xinzeng implements CZJK{
    public void work(Booklist booklist)
    {
//        System.out.println("新增图书");
        Scanner scan=new Scanner(System.in);

        System.out.println("请输入书名");
        String s=scan.next();
        System.out.println("请输入书的作者");
        String z=scan.next();
        System.out.println("请输入书的价格");
        int p=scan.nextInt();
        System.out.println("请输入书的类型");
        String l=scan.next();
        book b=new book(s,z,p,l);
        booklist.jiashu(booklist.getNum(),b);
        booklist.setNum(booklist.getNum()+1);
        System.out.println("新增成功");
    }
}
